package com.nbst.dao.mapper.mes;

import java.util.List;
import java.util.Map;

import com.nbst.dao.base.mapper.BaseMapper;
import com.nbst.model.base.Base;
import com.nbst.model.base.User;

public interface UserMapper extends BaseMapper<User> {
	/**
	 * 
	 * @Title: getUser2Dep
	 * @Description:根据用户ID查询用户代管部门信息
	 * @param @param uId 用户id
	 * @param @return
	 * @return List<Map<String,Object>>
	 * @throws
	 */
	List<Map<String,Object>> getUser2Dep(Integer uId);

	/**
	 * 根据条件查询部门与用户的权限树
	 * 
	 * @param map
	 * @return List<Base>
	 * @author King
	 * @date 2018-8-28
	 */
	List<Base> getDepartmentUserTree(Map<String,Object> map);

	/**
	 * 根据用户id删除用户与部门的关系
	 * 
	 * @param uId
	 * @return int
	 * @author King
	 * @date 2018-8-28
	 */
	int deleteByuIdUser2Dep(Integer uId);

	/**
	 * 新增用户与部门的关系
	 * 
	 * @param map
	 * @return int
	 * @author King
	 * @date 2018-8-28
	 */
	int insertUser2Dep(Map<String,Object> map);
	
	int insertSelectiveAPS(User user);

	List<String> getAllPM(Map map);
}